Fix --incremental crash on Type[...]#4038
Conversation
|
Is this something urgent (fixing a regression in a recent change) that should be cherry-picked into the release branch? Or is this something that has been around for a long time? It seems the second crash in #3852 is related to pointing mypypath to site-packages, which is not recommended. |
The bug is quite old (around a year), it started to be a crash in 0.510. So I don't think it is something urgent.
The crash doesn't depend on |
| self.item = item.fallback | ||
| else: | ||
| self.item = item | ||
| self.item = item |
There was a problem hiding this comment.
Why does this change help? Is it because the type attribute of an Instance might refer to FakeInfo during deserialization?
There was a problem hiding this comment.
(Or previously to None)
JukkaL
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the fix!
This fixes the second traceback reported in #3852. This also improves member lookup on
Type[...]by moving it to a later stage (checkmember.pyinstead of some manipulations inTypeTypeconstructor that are dangerous during de-serialization).By the way it looks like the first traceback reported in #3852 is just another manifestation of #3052, but instead of just deleting a class it is replaced by a
Varor by aFunctionDef.Also fixes #4058.